package com.bang.springcloud.eureka;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;

import javax.annotation.PreDestroy;

@SpringBootApplication
@EnableEurekaServer
public class EurekaServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(EurekaServerApplication.class, args);
    }

    @Autowired
    private LoadBalancerClient loadBalancerClient;

    @PreDestroy
    public void destory() {
        System.out.println(loadBalancerClient);
    }


}
